#ifndef SHCEDULE_THREAD_H
#define SHCEDULE_THREAD_H

#include <stdio.h>
#include <pthread.h>
#include <stdlib.h>
#include <unistd.h>

#include <signal.h>
#include <sys/time.h>
#include <sys/times.h>

#include <time.h>

typedef void* (*thread_func)(void *) ;

typedef enum
{
	false = 0,
	true  = 1
}bool;

typedef enum
{
    READY2GO = 0,
    RUNNING,
    WAITING,
    ENDOFF,
}ThrStat;

typedef struct 
{
    /* data */
    pthread_mutex_t mutex;
    pthread_cond_t cond;
	bool event_triggered;
}event;

//task thread private data, alloc in TCB mem area
typedef struct{
    pthread_t pthread;
    thread_func func;
    ThrStat Stat;
    void *param;
    event *even;
}thread_data;

#endif
